package file;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class CaricamentoFile {
	
	private ArrayList<String> list=new ArrayList<String>();
	private BufferedReader reader;
	
	public void setNomeFile(String string){
		list.clear();
		String line;
		try {
			reader=new BufferedReader(new FileReader(new File(string)));
			line=reader.readLine();
			while(line!=null){
				list.add(line);
				line=reader.readLine();
			}
			reader.close();
			
		} 
		
		
		catch (FileNotFoundException e) {
			
			e.printStackTrace();
		}
		catch (IOException e) {
			e.printStackTrace();
		}
	}
	public ArrayList<String> getList(){
		return list;
		
	}

}
